<!--盘点明细-->
<template>
  <div class="common-body-wrapper">
    <search-header single-width="130" :searchList="searchList" @changeHeight="toRetTable" @confirmSearch="toSearch" :isCheckbox="true" :isNeedTree="true" @setSelectedNode="setSelectedNode" :paramName="paramName"></search-header>
    <div class="common-table-tree-wrapper">
      <div class="common-table-wrapper">
        <multi-fun-table
          :sortColumn="notFormatColumn"
          :orderType="sortType"
          :fixed-cols="fixedCols"
          :is-reset-table="isResetTable"
          :theads-info="theadsInfo"
          :tbodys-info="tbodysInfo"
          @handleMultiCheck="handleMultiCheck"
          @handleSortColumn="handleSortColumn"
          @searchFn="getList"
          @getNextPage="getNextPage"
        >
          <div class="operate-btn-group" slot="operateBtnGroup">
            <a
              class="ake_btn ake_btn_text"
              v-if="isPermmited('MOBILE:CHECK_DETAIL:LIST')"
              @click.prevent="exportData()"
            >导出</a>
          </div>
          <template slot="tdCell" slot-scope="props">
            <el-table-column
              :fixed="props.fixed"
              :label="props.label"
              :min-width="props.minWidth"
              :width="props.width"
              :prop="props.prop"
              :sortable="props.sortable"
            >
              <template slot-scope="scope">
                <span v-if="'reno' == props.prop">{{scope.$index+1}}</span>
                <span v-else-if="'imgUrl' == props.prop">
                  <a class="imgLink" @click="showBigImgModal('bigPicModal', scope.row['imgUrl'])">
                    <img
                      class="carNoImage"
                      style="width: 60px;height:30px;"
                      alt="暂无"
                      :src="scope.row.imgUrl"
                    />
                  </a>
                </span>
                <span v-else>{{ scope.row[props.prop] }}</span>
              </template>
            </el-table-column>
          </template>
        </multi-fun-table>

        <table-pagination :size="total" :cur-page="pageNumber" @backData="getPagination"></table-pagination>
      </div>
    </div>

    <big-pic-modal ref="bigPicModal">
      <img
        slot="bigImgSlot"
        :src="bigImgPath | setImgPath"
        alt
        @error="imgError('../../', 'car', $event)"
      />
    </big-pic-modal>
  </div>
</template>

<script>
import common from "@mixins/common.js";
import stardardList from "@mixins/tables/stardardList.js";

//modal
import invokeModal from "@mixins/modal/invokeModal.js";
import BigPicModal from "@components/widgets/BigPicModal.vue";

// image
import images from "@mixins/image.js";

// 引进vue的js
import parking_check_detail from "./js/parking_check_detail.js";

export default {
  name: "parkingCheckDetail",
  mixins: [common, stardardList, invokeModal, images, parking_check_detail],
  components: {
    BigPicModal
  },
  props: ["setData"],
  data() {
    const today = [
      new Date(moment().format("YYYY-MM-DD 00:00:00")),
      new Date(moment().format("YYYY-MM-DD 23:59:59"))
    ];

    return {
      fixedCols: 3,
      total: 0,
      ones: 5566,
      paramName: 'parkIds',
      //prop-返回数据的字段名称   proisNotInter:true,pNameisNotInter:true,，name-查询字段传参名称    text-显示名称  //initHidden  初始化不显示
      searchList: [
        {
          type: "datePicker",
          isShow: false,
          name: "query_time_pandian",
          text: "盘点时间",
          propName: "checkTimeFrom,checkTimeTo",
          value: today,
          style: { width: "360px" }
        },
        {
          type: "text",
          isShow: false,
          name: "code",
          text: "盘点编号",
          value: "",
          style: { width: "360px" }
        },
        {
          type: "text",
          isShow: false,
          name: "realName",
          text: "盘点人",
          value: ""
        },
        {
          type: "text",
          isShow: false,
          name: "carCode",
          text: "车牌号",
          value: ""
        },
        {
          type: "datePicker",
          isShow: false,
          name: "query_time_up",
          text: "上报时间",
          propName: "reportTimeFrom,reportTimeTo",
          value: "",
          style: { width: "360px" }
        },
        {
          type: "select",
          isShow: false,
          name: "checkStatus",
          text: "盘点状态",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "盘点在场", value: "0" },
            { name: "盘点离场", value: "1" },
            { name: "盘点补录", value: "2" },
            { name: "盘点未补录", value: "3" }
            // { name: "盘点未离场", value: "4" }
          ]
        },
        {
          type: "select",
          isShow: false,
          name: "isMarkNight",
          text: "是否标记过夜",
          value: "",
          options: [
            { name: "全部", value: "" },
            { name: "是", value: "1" },
            { name: "否", value: "0" }
          ]
        }
      ],
      theadsInfo: [
        // { index: 0, isShow: false, prop: "reno", text: "序号", width: 64 },
        {
          index: 1,
          isShow: false,
          prop: "carCode",
          text: "车牌",
          sortable: true,
          minWidth: 60
        },
        {
          index: 2,
          isShow: false,
          prop: "code",
          text: "盘点编号",
          sortable: true,
          minWidth: 50,
          initHidden: true
        },
        {
          index: 3,
          isShow: false,
          prop: "imgUrl",
          text: "盘点图片",
          sortable: false,
          minWidth: 60
        },
        {
          index: 4,
          isShow: false,
          prop: "carportNumber",
          text: "车位编号",
          sortable: true,
          minWidth: 50
        },
        {
          index: 5,
          isShow: false,
          prop: "isMarkNightStr",
          text: "是否标记过夜",
          sortable: true,
          minWidth: 50
        },
        {
          index: 6,
          isShow: false,
          prop: "checkTime",
          text: "盘点时间",
          sortable: true,
          minWidth: 80
        },
        {
          index: 7,
          isShow: false,
          prop: "reportTime",
          text: "上报时间",
          sortable: true,
          minWidth: 80
        },
        {
          index: 8,
          isShow: false,
          prop: "checkStatusStr",
          text: "盘点状态",
          sortable: true,
          minWidth: 50
        },
        {
          index: 9,
          isShow: false,
          prop: "realName",
          text: "盘点人",
          sortable: true,
          minWidth: 50
        }
      ],
      tbodysInfo: []
    };
  },
  methods: {}
};
</script>

<style lang="less" scoped>
</style>
